<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<title>登录界面</title>
<link href="/css/syslogin.css" type="text/css" rel="stylesheet" />
<script src="/js/jquery-1.8.3.min.js"></script>
</head>
<body>
<div class="wrapper">
	<form action="/index.php?r=supervisor/login" method="post" onsubmit="return checkFrom();return false;">
	<div class="main">
		<div class="mod_login">
			<div class="login_item">
				<span class="login_field">username:</span>
				<input class="login_ipt_txt" type="text" name="loginname" id="loginname" />
			</div>
			<div class="login_item">
				<span class="login_field">password:</span>
				<input class="login_ipt_txt" type="password" name="password" id="password" />
			</div>
			<div class="login_item">
				<input type="submit" value="submit" class="login_btn"/>
			</div>
		</div>
	</div>
	</form>
</div>
	<script type="text/javascript">
	$(document).ready(function(){
		$(".login_ipt_txt").click(function(){
			$(this).css({"background-color" : ""});
		}).blur(function(){
			$(this).css({"background-color" : ""});
		})
	})	
	function checkFrom(){
		if($("#loginname").val() == ""){
			$("#loginname").css({"background-color" : "pink"});
			$("#loginname").focus();
			return false;
		}
		if($("#password").val() == ""){
			$("#password").css({"background-color" : "pink"});
			$("#password").focus();
			return false;
		}
		return true;
	}
	</script>
</body>
</html>